package com.foreknow.demo17;

/**
 * 动态可变参数
 */
public class A {
    public void m1(int a,int b) {
        System.out.println(a + b);
    }

    /**
     *
     * @param values 动态可变参数 可以理解为： Object[]
     */
    public void m2(String sql,Object...values) {

    }

    public static void main(String[] args) {
        A a = new A();
        a.m1(1,2);
        a.m2("select * from user where username = ? and password = ?","fender","123456");
    }
}
